Skip to content

Conversation

@godnight10061
Copy link
Contributor

Summary

  • Installs Triton automatically where PyTorch doesn’t provide it by default:
    • Windows + CUDA (cu* / nightly/cu*): installs triton-windows
    • Linux + ROCm 6.x+: installs pytorch-triton-rocm (from https://download.pytorch.org/whl)
    • Linux + XPU: installs pytorch-triton-xpu (from https://download.pytorch.org/whl)
  • Adds missing runtime dependency packaging (required by torchruntime.platform_detection).
  • Updates docs and adds installer unit tests.

Refs: #5

Why

torch.compile (and many third-party kernels) require Triton. On some platforms Torch bundles it (e.g. Linux CUDA), but on others users end up without Triton even after installing a GPU build of Torch.

Implementation

  • torchruntime/installer.py appends an extra pip install command for the platform-specific Triton package.
  • Kept logic minimal and platform-gated (no changes to platform detection).

Testing

  • Unit tests: python -m pytest -q.
  • Real GPU smoke test (Windows, RTX 3060 Ti, Python 3.10):
    1. Create clean venv
    2. Install torch/torchvision/torchaudio from https://download.pytorch.org/whl/cu128
    3. Verify import triton fails
    4. Run python -m torchruntime install -> installs triton-windows
    5. Run a torch.compile CUDA smoke test -> OK

Request For Testing (hardware help wanted)

If you have one of these setups, please try:

  • Linux ROCm (6.x): python -m torchruntime install then verify import triton and run a small torch.compile test.
  • Linux Intel XPU: same as above.
    Also welcome: Windows CUDA users on different GPUs/Python versions.

@godnight10061
Copy link
Contributor Author

Hi @iwr-redmond, since you mentioned ROCm support in Issue #5, could you help test if this installation logic works on your AMD setup?

@cmdr2
Copy link
Contributor

cmdr2 commented Dec 26, 2025

Thanks @godnight10061 ! You can also ask on the #development channel in Easy Diffusion's discord server, since a few helpful users (with Linux) also hang out there - https://discord.com/invite/u9yhsFmEkB

You may also want to provide a simple script file that they can run to test torch.compile.

@cmdr2
Copy link
Contributor

cmdr2 commented Dec 26, 2025

I'll give it a try with Windows 11 + WSL2 (Ubuntu) soon

@iwr-redmond
Copy link
Contributor

Hi @iwr-redmond, since you mentioned ROCm support in Issue #5, could you help test if this installation logic works on your AMD setup?

My RTX 4070 is as useful for testing ROCm as the second buggy in a one-horse town.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants